import {HTTP} from '../utils/http'

class GoodsModel extends HTTP{
  // list(){
  //   return this.request({
  //     url:'/login',
  //   })
  // }
  banner(){
    return this.request({
      url:'index/goods/banner',
    })
  }
  category(){
    return this.request({
      url:'goods/category/index',
    })
  }
  getGoodsList(categoryId,current){
    return this.request({
      url:'goods/v2/getGoodsList',
      data: {
        "size":10,
        "current":current,
        "categoryId":categoryId
      }
    })
  }
  recommendList(){
    return this.request({
      url:'goods/v2/recommend',
      data: {'type':2}
    })
  }

  /// vipType|int32|会员类型 1为一级会员 2为二级会员|true|-
  vipList(vipType){
    return this.request({
      url:'goods/v2/getVipGoodsList',
      data: {
        vipType:vipType||1
      }
    })
  }

  detail(goodsId){
    return this.request({
      url:'goods/v2/details',
      data:  {'goodsId': goodsId}
    })
  }


}

export {GoodsModel}